1. Field of the Invention
The present invention relates to a focus detection method a focus detection apparatus for detecting a focus in accordance with the contrast of image data on a captured image.
2. Description of the Prior Art
As a conventional focus detection method for compact AF digital cameras, a contrast detection method for detecting a focus in accordance with the contrast of data on a captured image is known in the art. Conventional focus detection apparatuses using the contrast detection method operate to determine the position of a focusing lens group in which contrast of an object image (image data) which is captured by an image pickup device by repeating an image capturing operation while moving the focusing lens group between an infinite focus position and a closest focus position becomes maximum. Therefore, in such conventional focus detection apparatuses, an image capturing operation is performed successively at different positions of the focusing lens group while the focusing lens group is driven stepwise from the infinite (longest) focus position (position for bringing an object at infinity into focus) to the closest (shortest) focus position to obtain a contrast from a captured image signal at each different position of the focusing lens group, and a maximum value (peak value) of contrast among the contrast values obtained at the aforementioned different positions of the focusing lens group is determined so that the focusing lens group is driven to a position thereof where the maximum contrast value is obtained to bring the object into focus. Such a focus detection apparatus is disclosed in, e.g., Japanese Unexamined Patent Publication No. 2001-249267.
However, according to such a conventional focus detection method, in the case where an object to be photographed is located at, e.g., at a closest focusing distance (closest focusing position) or in the close vicinity thereof, a peak contrast value of an image of the object sometimes cannot be detected as a peak contrast value even though the peak contrast value exists at the close-distance position or in the vicinity thereof. In such a case, according to a conventional focus detection method, it is determined that it is impossible to detect a peak contrast value, and a focus is set at a predetermined fixed point. Therefore, in this case, an intended object to be photographed which is located at the closest focusing distance becomes out-of-focus.